---***FIXME: what tags are really needed?

local unitName = "Margan_Carryall"

unitDef = {
name                = "Margan Carryall",
description         = "The Margan Transport",
objectName          = [[WL_Margan_Carryall.s3o]],
script              = [[WL_Margan_Carryall_script.lua]],

bmcode              = [[1]],

builder             = false,
buildPic            = [[Margan_Carryall.png]],
buildTime           = 3500,
canAttack           = true,
iconType = "air",

----cost
buildCostEnergy     = 3800,
buildCostMetal      = 150,
----health
maxDamage           = 1300,
idleAutoHeal        = 0,
----movement
maxVelocity         = 5.5,
acceleration        = 0.2,
brakeRate           = 3.75,
moverate1           = [[3]],
footprintx          = 3,
footprintZ          = 3,
Upright 			= false,
maneuverleashlength = 1280,
collide             = true,
collision 			= true,
steeringmode        = [[1]],
TEDClass            = [[VTOL]],
turnRate            = 500,
turnRadius		  	= 5,
----aircraft related
canFly              = true,
dontLand		 	= false,
cruiseAlt           = 350,
hoverAttack         = true,
airStrafe			= true,
bankscale           = 1,
maxBank				= 0.2,
maxPitch			= 0.2,

sightDistance       = 800,
canGuard            = true,
canMove             = true,
canPatrol           = true,
canstop             = [[1]],
category            = [[AIR]],
mass                = 125,

    ExplodeAs = "MEDIUM_UNIT_EXPLOSION",

transportCapacity=2,
transportSize=2,
transportUnloadMethod=1,
holdSteady=true,
fallSpeed=0.5,
releaseHeld=false,

     sfxtypes            = {   
       explosiongenerators = {
--the effects used for EmitSfx in unit script
      "custom:TANKGUN_FX",
      "custom:TANKGUN_FX",
       },
--the effects randomly chosen for flying pieces
      pieceExplosionGenerators =
      {
      "Crashexplosion",
      "Crashexplosion",
      },   
     },

weapons = {
        [1] = {
            def = "orangeblob",
	     onlyTargetCategory = [[LAND]],
        },
    },
}


local weaponDefs = {
    orangeblob = {
		name = "Flamethrower",
      explosionGenerator      = [[custom:Flash4]],
	  fireStarter             = 100,
	  impulseBoost            = 0,
      impulseFactor           = 0,
CollisionSize=3,
		avoidfriendly = true,
collisionFriendly=0,
				flamegfxtime = 2.2,
		texture1 = "fireball",
sizegrowth=0.7,
      intensity               = 0.1,
      interceptedByShieldType = 3,
      noSelfDamage            = true,
      range                   = 450,
burst=25,
burstRate=0.001,
				sprayangle = 1600,
      reloadtime              = 1,
	  rgbColor                = [[1 1 1]],
	  soundStart              = [[flamethrower]],
      soundTrigger            = true,
      turret                  = true,
      weaponType              = [[Flame]],
      weaponVelocity          = 200,
		damage =
		{
			default = 0.5,
		},
	},
}



unitDef.weaponDefs = weaponDefs
return lowerkeys({ [unitName]  =  unitDef })


